* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    margin: 10px auto;
}

.container .item {
    margin-bottom: 10px;
    /* 防止div中间折行 */
    break-inside: avoid;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
}

.container .item img {
    /* display: block; */
    width: 100%;
}

.container .item button{
    display: block;
}


@media (min-width:1200px) {
    .container {
        column-count: 4;
    }
}

@media (600px <=width < 1200px) {
    .container {
        column-count: 3;
    }
}

@media (400px <=width < 600px) {
    .container {
        column-count: 2;
    }
}

@media (width < 400px) {
    .container {
        column-count: 1;
    }
}